package cate.game.role.pay.trademall.forevercontract.paycallback;


import cate.common.table.d.GDFunc;
import cate.common.table.pay.PayItemRow;
import cate.game.GameBody;
import cate.game.pay.PayCallback;
import cate.game.role.Role;
import cp.solution.business.pay.PayRecordEntity;
import cp.solution.business.pay.dto.PayDeliverResult;

public class ForeverContractCallback extends PayCallback {
    @Override
    public void onSuccess(GameBody game, Role role, PayRecordEntity record, PayDeliverResult result) {
        PayItemRow pir = game.table.pay.item.get(record.itemTid);
        if (pir == null) {
            return;
        }
        if (pir.funcId != GDFunc.FOREVER_CONTRACT) {
            return;
        }
        role.getPay().tradeMall.foreverContract.onPaySuccess(pir.funcSubId);
    }

    @Override
    public void onFail(GameBody game, Role role, PayRecordEntity record, PayDeliverResult result) {

    }
}
